﻿<UserControl x:Class="SLExtensions.Showcase.PageVirtualizedStackPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:slec="clr-namespace:SLExtensions.Controls;assembly=SLExtensions.Controls"    
    xmlns:local="clr-namespace:SLExtensions.Showcase"

    >
    <UserControl.Resources>
        <DataTemplate x:Name="itemTemplate">
            <TextBlock Text="{Binding }"/>
        </DataTemplate>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
                

        <slec:VirtualizedListBox x:Name="vsp" ItemTemplate="{StaticResource itemTemplate}" />
        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2">
            <Button Content="Load 1 000 000 rows" Click="Load_Click"/>
        </StackPanel>
    </Grid>
</UserControl>
